package com.itheima.day06.ZuoYe.ZuoYe2;

public final class XuanZhe {
    private XuanZhe() {}
    public static final void compare2(double[] arr)
    {
        for (int i = 0; i < arr.length-1; i++) {
            for (int j = i+1; j < arr.length; j++) {
                if(arr[i] < arr[j]){
                    double temp = 0;
                    temp = arr[i];
                    arr[i] = arr[j];
                    arr[j] = temp;
                }

            }
        }
        for (int i = 0; i < arr.length; i++) {
            System.out.println("排序后身高信息为："+arr[i]);
        }
    }

}
